home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
wildcat
/
wc_bink.zip
/
BINK.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-12-17
|
19KB
|
409 lines
@echo off
REM /******************************************************************\
REM /* Ok, here we go. First, I set the environment variables that *\
REM /* wildcat needs for execution. Assumptions are as follows: *\
REM /* Wildcat directory is C:\WC30 and Binkley dir is D:\BINKLEY *\
REM /******************************************************************\
set WCNODEID=1
set WCPORTID=1
set WCMDM=NONE
set WCNODELIST=D:\BINKLEY\NODE\
REM /******************************************************************\
REM /* That being done, I start up BNU as my fossil driver. Frankly, *\
REM /* you could use anything. I just prefer BNU as it has proven *\
REM /* very stable. I use BNU170. *\
REM /******************************************************************\
BNU /F+ /R:2048
:START
REM
REM The following environment variables aid in deciding what process is
REM presently executing. If the LIVE variable has a value, the user is calling the
REM BBS. Since my batch file runs both the mailer and Wildcat, I use
REM environment variables to indicate if the bat file is in a "mailer"
REM mode, or in a "BBS caller is online" mode. If BINK.BAT is started when
REM the variable LIVE is equal to 2, then a user has called, hit escape,
REM and been processed by BBSBATCH.BAT/SPAWNBBS.BAT (this whole setup
REM assumes the BBS Batch parameter specified in the Binkley/Milque.cfg file.
REM
if 2==%live% goto WILDCAT
REM This checks to see if new nodediff files have been received. If the
REM nodediff.* exists in the inbound files area they are moved to the Bink
REM node area to be compiled.
REM
if exist d:\binkley\files\nodelist\nodediff.* goto NLIST
if exist d:\binkley\files\nodelist\nodelist.* goto NLIST
REM
REM By this point, we know a caller isn't online, so we clear out all our
REM Environment variables, and initialize the mailer
REM
REM
SET LIVE=
set baud=
set minleft=
D:
cd\binkley
cls
REM
REM Here we get to the "meat" of things. Since I run BinkleyTerm 2.56 beta
REM here, I need to load a video fossil if I want to get a color screen.
REM I use VFOS_DV, as I use DesqView, but VFOS_IBM works as well in a non-
REM DV environment. Frankly, I've used VFOS_DV in a non-Desqview environment
REM as well, so I don't bother switching. The Video fossil must always
REM be loaded last, after the communications fossil (BNU in my case). I
REM always unload it if I'm dropping to Wildcat, or not kicking binkley back
REM up immediately, in order to save memory.
REM
vfos_dv
REM
REM Here, I start up the mailer, BT.EXE.
REM
bt
REM /******************************************************************\
REM /* Now it gets nasty.... here's how we do things. Control in the *\
REM /* BAT file is via ERRORLEVELS. Binkley returns errorlevels *\
REM /* as follows: *\
REM /* For a caller pressing Escape, the errorlevel is the linespeed *\
REM /* divided by 100, such as 96 for 9600, 24 for 2400, 12 for 1200, *\
REM /* etc, except when the line speed exceeds 9600 (ie, if you *\
REM /* run with a locked DTE rate as I do, and you configure Binkley *\
REM /* with the DTE locked, it will always exit with the errorlevel *\
REM /* for the DTE rate, and will pass to the BBS both the connect *\
REM /* rate and the DTE rate. I run locked at 19200, so the errorlevel*\
REM /* for a "human" caller is always 192. Above 19200, the error- *\
REM /* levels change... consult the Binkley docs for the errorlevel *\
REM /* returned for 38,400 and 57,600 DTE rate connects.) *\
REM /******************************************************************\
REM /* Other errorlevels are set by the BinkleyTerm event file, *\
REM /* such as errorlevels for receipt of mail. Errorlevels evenly *\
REM /* divisible by 100 are function key presses (ie, errorlevel *\
REM /* 100 means F10 was pressed and errorlevel 50 means F5 was *\
REM /* pressed. *\
REM /******************************************************************\
if errorlevel 255 goto exit-err
if errorlevel 254 goto exit-nl
if errorlevel 192 goto LDBBS
if errorlevel 144 goto LDBBS
if errorlevel 100 goto Lococat
if errorlevel 96 goto LDBBS
if errorlevel 90 goto packmail
if errorlevel 70 goto bonkit
if errorlevel 60 goto Msg_read
if errorlevel 50 goto Act_view
if errorlevel 48 goto LDBBS
if errorlevel 46 goto nmh_tts
if errorlevel 45 goto nmh_mwf
if errorlevel 40 goto nmh_in
if errorlevel 24 goto LDBBS
if errorlevel 20 goto Mail_in
if errorlevel 12 goto LDBBS
if errorlevel 10 goto maint
if errorlevel 3 goto LDBBS
if errorlevel 1 goto Exit
if errorlevel 0 goto Exit
goto Exit
REM /******************************************************************\
REM /* We come here if a caller is online. *\
REM /* *\
REM /* Here, BBSBATCH.BAT is executed, which is a file Binkley *\
REM /* creates itself, containing the callers' speed, time before *\
REM /* the next mailer event, etc. BBSBATCH.BAT will attempt to run *\
REM /* SPAWNBBS.BAT, which YOU MUST PROVIDE. I use SPAWNBBS.BAT to *\
REM /* set environment variables (like the afformentioned %live% *\
REM /* variable among others, and then it re-calls the BINK.BAT file *\
REM /* (This avoids my having to run a batch file for Wildcat and *\
REM /* another for Binkley). Here's my SPAWNBBS.BAT (Since Wildcat *\
REM /* doesn't like a connect speed of 12000, I do a little "fancy *\
REM /* dance" to reset it to 9600. I also make sure the /ARQ message *\
REM /* that my modem returns for error-correcting conditions is also *\
REM /* recognized, as Wildcat needs to be told in a different way.) *\
REM /* *\
REM /* if .%5==. SET EC= *\
REM /* if .%5==./Arq SET EC=MNP *\
REM /* if .%5==./ARQ SET EC=MNP *\
REM /* if .%baud%==.12000 goto fixbaud *\
REM /* bink.bat *\
REM /* goto endit *\
REM /* :fixbaud *\
REM /* set baud=9600 *\
REM /* bink.bat *\
REM /* :endit *\
REM /* set live=2 *\
REM /* set dte=%1 *\
REM /* set baud=%2 *\
REM /* set minleft=%4 *\
REM /* bink.bat *\
REM /* *\
REM /* That's all it needs.... *\
REM /* *\
REM /******************************************************************\
:LDBBS
VFOS_DEL
REM SET vfosstat=
BBSBATCH.BAT
REM /******************************************************************\
REM /* I use Golded for my external netmail reader. You don't have to *\
REM /* use it, as Wildcat supports Netmail, but I find it easier not *\
REM /* having to log onto the BBS to read netmail. *\
REM /* *\
REM /* *\
REM /* I use SQUISH to handle netmail routing, hence the "squish *\
REM /* squash" line... it's explained further on below. *\
REM /******************************************************************\
:msg_read
VFOS_DEL
golded
if errorlevel 2 goto pakmsg
goto start
:pakmsg
squish squash -salways
goto start
:bonkit
REM /******************************************************************\
REM /* I use BONK as my outbound manager. It's the greatest thing *\
REM /* since sliced bread in my opinion. You can obtain it here as *\
REM /* BONK_174.ARJ *\
REM /******************************************************************\
VFOS_DEL
bonk
goto start
:WILDCAT
REM /******************************************************************\
REM /* Here's where Wildcat is actually executed. This is essentially *\
REM /* a CAT.BAT imbedded in the BINK.BAT file. Nothing special here, *\
REM /* except to clear and use some environment variables set by the *\
REM /* SPAWNBBS.BAT file. *\
REM /******************************************************************\
del bbsbatch.bat
c:
cd\wc30
:doit
Wildcat /B %baud%%ec% %minleft%
:endcat
SET LIVE=
goto start
:mail_in
REM /******************************************************************\
REM /* Mail_in is the routine that calls Wildmail to toss newly *\
REM /* incoming mail. It is called by errorlevel 20 exit from BT, *\
REM /* because I code an E2=20 in the Binkley.evt even description *\
REM /* file. There are other ways to do this as well.. consult the *\
REM /* docs for Binkley. C:\WC30\MAILCHK.BAT is the batch file that *\
REM /* runs Wildmail. I externalized it so I could manually run a *\
REM /* scan/toss myself. The CALL parameter is important, due to *\
REM /* batch programming rules.. we want control to come back to *\
REM /* THIS batch file when MAILCHK.BAT is done. If you forget to *\
REM /* use the CALL parameter when running one batch file from *\
REM /* within another, the calling batch file terminates. *\
REM /******************************************************************\
VFOS_DEL
AT H1
call c:\wc30\mailchk.bat
goto start
REM /******************************************************************\
REM /* nmh_in, nmh_mwf, and nmh_tts are special schedules for SQUISH's*\
REM /* routing function to handle special situations. I run nmh_mwf on*\
REM /* Monday, Wednesday, and Friday. You can gues when nmh_tts runs *\
REM /* (grin). This is controlled by the Binkley/Milque.evt file *\
REM /* as to when each is executed by specifying E1=errorlevel. *\
REM /* nmh_in is run when mail comes in during a network mail hour, *\
REM /* and ensures nothing is tossed until all mail for the mail *\
REM /* hour has been received. That way I don't spend half my mail *\
REM /* hour tossing echomail, instead of placing mail calls. *\
REM /******************************************************************\
:nmh_in
VFOS_DEL
call c:\wc30\mailchk.bat NMH
goto start
:nmh_mwf
VFOS_DEL
call c:\wc30\mailchk.bat POLLMWF
D:\
cd \binkley
REM /************************************************************************\
REM /* PLEASE is a small utility to issue certain commands like SEND, GET *\
REM /* and POLL from a command line. POLL commands could also be done *\
REM /* via the SQUISH program as elements of a schedule block. It's a *\
REM /* matter of preference. *\
REM /* PLEASE is available here as PLZ22.LZH and PLEZ210.LZH (get both). *\
REM /* I use PLEASE to poll my network hosts daily for mail. *\
REM /************************************************************************\
REM
PLEASE POLL 100:902/0 CRASH
PLEASE POLL 1:143/110 CRASH
PLEASE POLL 77:1/0 CRASH
goto start
:nmh_tts
VFOS_DEL
REM set vfosstat=
WAIT! 5
call c:\wc30\mailchk.bat POLLTTS
D:\
cd \binkley
PLEASE POLL 100:902/0 CRASH
PLEASE POLL 1:143/110 CRASH
PLEASE POLL 77:1/0 CRASH
goto start
:packmail
REM /************************************************************************\
REM /* "Packing" mail, in a Binkley environment, means doing nother more *\
REM /* than compressing netmail into archived packets, and routing them *\
REM /* to the proper hubs, and also providing a means of controlling the *\
REM /* "flavor" of echomail bindles, allowing you to HOLD, CRASH, or *\
REM /* otherwise tailor mail bundles. Other mailers like FrontDoor and *\
REM /* D'Bridge have this routing/control feature internalized, but *\
REM /* Binkley does not. I use SQUISH to perform this function. Other *\
REM /* acceptable (and smaller) packages are QMail, OMMM, and BNP. *\
REM /************************************************************************\
REM
VFOS_DEL
squish squash -SALWAYS
goto start
:act_view
REM /************************************************************************\
REM /* I have assigned F5 from the binkley screen to run the ActView *\
REM /* activity log analyzer for Wildcat. It is invoked from this section. *\
REM /************************************************************************\
REM
VFOS_DEL
C:\
CD \WC30
actview
D:\
CD \Binkley
goto start
:NLIST
REM /************************************************************************\
REM /* Here's where things get hairy. A new Nodelist or Nodediff file for *\
REM /* FIDOnet has been received. I have my mail tossing batch file copy *\
REM /* all NODELIST.* and NODEDIFF.* files to a "holding pen", and if the *\
REM /* pen is found to have anything in it when BINK.BAT is started, this *\
REM /* routine is run. It simply compiles a new nodelist using QNODE. *\
REM /* Other utilites like XLAXNODE will also compile a version 7 nodelist, *\
REM /* but QNODE, while slower, is free. QNODE174.ARJ on this BBS *\
REM /************************************************************************\
REM
VFOS_DEL
d:\
cd \binkley\node
copy D:\binkley\files\nodelist\*.*
REM /************************************************************************\
REM /* QDIFF applies nodediff files to the master nodelist file from last *\
REM /* week. *\
REM /************************************************************************\
QDIF NODELIST!NODEDIFF
REM /************************************************************************\
REM /* QNODE performs the compilation of the nodelist Binkley needs to *\
REM /* operate. *\
REM /************************************************************************\
QNODE
if errorlevel 0 goto ok
goto exit-nl
ok:
REM /************************************************************************\
REM /* QIDX creates cross-reference indices. *\
REM /************************************************************************\
QIDX /N
QIDX /S
cd \binkley
REM /************************************************************************\
REM /* Since I use the GOLDED editor, it needs its' own special nodelist *\
REM /* compilation... yet more disk space wasted.... *\
REM /************************************************************************\
goldnode -F golded.cfg
cd \binkley\node
REM /************************************************************************\
REM /* finally, since WILDCAT needs yet ANOTHER special nodelist compilation*\
REM /* format, I have to run WILDNODE now.. be careful! Wildnode does NOT *\
REM /* delete old compiled nodelists, and do not use a version of Wildnode *\
REM /* older than 1.50. Trust me. *\
REM /************************************************************************\
wildnode
REM /************************************************************************\
REM /* Clean up the file in the holding pen... *\
REM /************************************************************************\
del d:\binkley\files\nodelist\nodediff.*
del d:\binkley\files\nodelist\nodelist.*
cd \binkley
goto start
:LOCOCAT
REM /******************************************************************\
REM /* LOCOCAT is for loggin onto Wildcat Locally by hitting F10 in *\
REM /* the Binkley mailer screen. *\
REM /******************************************************************\
VFOS_DEL
set minleft=
set baud=local
c:\
cd \wc30
goto doit
:maint
REM /******************************************************************\
REM /* maint is my routine that calls a maintenance batch file called *\
REM /* C:\WC30\MONGO.BAT to do door maintenance, and other nightly *\
REM /* trivia. I reboot the PC as a last step of MONGO.BAT to start *\
REM /* fresh by issuing a BNU /B command to the fossil. Consequently, *\
REM /* the routine should never get past MONGO.BAT *\
REM /******************************************************************\
VFOS_DEL
BNU /U
c:
cd \wc30
mongo.bat
BNU /F+ /R:2048
goto start
:BC
VFOS_DEL
REM vfosstat=
echo ...................................................................
echo ...................................................................
echo ...................... BAD CONNECTION RECYCLE......................
echo ...................................................................
echo ...................................................................
echo ...................................................................
set live=
set baud=
goto start
:Exit
VFOS_DEL
REM set vfosstat=
BNU /U
goto getout
:exit-nl
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
Echo THE NODELIST IS CORRUPTED...........SHUTTING DOWN
:exit-err
VFOS_DEL
REM set vfosstat=
BNU /U
goto getout
:getout